Accurate Garbage Collection in Uncooperative Environments with Lazy Pointer Stacks
نویسندگان
چکیده
Implementing a new programming language by the means of a translator to an existing language is attractive as it provides portability over all platforms supported by the host language and reduces the development time as many low-level tasks can be delegated to the host compiler. The C and C++ programming languages are popular choices for many language implementations due to the availability of efficient compilers on many platforms, and good portability. For garbage-collected languages, however, they are not a perfect match as they provide no support for accurately discovering pointers to heap-allocated data. We evaluate the published techniques, and propose a new mechanism, lazy pointer stacks, for performing accurate garbage collection in such uncooperative environments. We implemented the new technique in the Ovm Java virtual machine with our own Java-to-C++ compiler and GCC as a back-end, and found that our technique outperforms existing approaches.
منابع مشابه
Accurate garbage collection in uncooperative environments revisited
Implementing a concurrent programming language such as Java by the means of a translator to an existing language is attractive as it provides portability over all platforms supported by the host language and reduces development time – as many low-level tasks can be delegated to the host compiler. The C and C++ programming languages are popular choices for many language implementations due to th...
متن کاملMalloc Pointers and Stable Pointers: Improving Haskell's Foreign Language Interface
The Glasgow Haskell compiler provides a foreign language interface which allows Haskell programs to call arbitrary C functions. This has been used both to implement the standard Haskell IO system and a variety of applications including an arcade game 8], and a graphical user interface to a database 19]. The theoretical problems associated with using impure functions from pure functional languag...
متن کاملJava Memory Allocation with Lazy Worst Fit for Small Objects
Memory allocation is an important part of modern programming languages, including garbagecollected languages such as Java. We propose a fast memory allocation scheme for Java using lazy worst fit (LWF), where pointer increment is used as the primary allocation method and worst fit is used as a backup. We evaluated LWF on a working Java virtual machine with non-moving garbage collection, and the...
متن کاملInferring Type Maps during Garbage Collection
Conservative garbage collectors are designed to operate in environments that do not provide su cient information on the location of pointers. Instead of relying on compiler provided information on the location of pointers, they assume that any bit pattern that could be a valid pointer in fact is a valid pointer. This, however, can lead to ine ciencies and pointer misidenti cations. In this posi...
متن کاملA multi-processor shared memory architecture for parallel cyclic reference counting
Counting with Lazy Mark-Scan [7]. There are two processors P 1 and P 2 , which will perform graph rewriting and garbage collection simultaneously. Both processors share the same memory area, the working space which is organised as a heap of cells. We assume that the mutator will never point at a garbage node. However, by changing edges the mutator can turn reachable nodes into garbage. In case ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2007